]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
sessionMode: Add 'allowScreencast' property
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 8 May 2013 18:25:34 +0000 (20:25 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 10 May 2013 17:49:01 +0000 (19:49 +0200)
Our built-in screen recorder is implemented as a component, so it will
just be disabled when the session mode doesn't allow screencasting.
However we will expose screencasting functionality on DBus as well, and
while it makes sense to restrict its availablity to the same modes as
the existing recorder, exporting/unexporting the service depending on
the session mode is not very consumer friendly.
For that reason, add an additional 'allowScreencast' property that for now
mirrors the availability of the 'recorder' component.

https://bugzilla.gnome.org/show_bug.cgi?id=696247

js/ui/sessionMode.js

index edf2e0623613a2a0978519ea5243c71da8374ae5..4738c2e2922cddb84f397ceb0c7e8ebf027f5c6c 100644 (file)
@@ -184,6 +184,10 @@ const SessionMode = new Lang.Class({
         return this._modeStack[this._modeStack.length - 1];
     },
 
+    get allowScreencast() {
+        return this.components.indexOf('recorder') != -1;
+    },
+
     _sync: function() {
         let params = this._modes[this.currentMode];
         let defaults;